package com.joysuch.wwyt.dynamicdata.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.joysuch.wwyt.dynamicdata.entity.BaseDynamicData;
import com.joysuch.wwyt.dynamicdata.entity.dto.DynamicDataDto;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author jwk
 * @since 2021-11-26
 */
public interface BaseDynamicDataService extends IService<BaseDynamicData> {

    /**
     * find data by biz id
     * @param bizId
     * @return
     */
    List<BaseDynamicData> findDataByBizId(Long bizId);

    /**
     * find data by biz ids
     * @param bizIds
     * @return
     */
    List<DynamicDataDto> findDataByBizIds(Set<Long> bizIds);

    /**
     * save or update data batch
     * @param dataList
     * @param bizIds
     * @return
     */
    boolean saveOrUpdateDataBatch(List<BaseDynamicData> dataList, Set<Long> bizIds);

}
